<% @title = "#{t :trasach}" %>
<% if(@borrowedtables.count == 0) %>
<font size = '3'>                              
<h4><%= t :xayraloi%></h4>
<br/>
<a href = "/borrowedtables/paybook"><%= t :quaylai%></a>
</font>
<%else%>
<a color = 'color'><h1><%= t :trathanhcong%></h1></a>
<%  @borrowedtables.each do |borrowedtables| %>
<%  borrowedtables.update_attribute(:PayedDate,borrowedtables.PayedDate = Date.today)%>
<%  @pro = Product.find(:all, :conditions => ['product_id = ?',"#{borrowedtables.product_id}"])  %>
    <%@pro.each do |pro|%>
    <%pro.update_attribute(:Status,pro.Status = pro.Status+1)%>
    <%end%>   
<font size = '5'>
<b> <%= t :nguoidung%>:</b> 
<%=borrowedtables.NameOfBorrow%>
</br>
<b> <%= t :tensach%>: </b> 
<%=borrowedtables.NameOfDrink%>
</br>
<b> <%= t :ngaymuon%>: </b> 
<%=borrowedtables.BorrowedDate%>
</br>

<b><%= t :hantrasach%>: </b> 
<%=borrowedtables.Deadline%>
</br>

<b><%= t :ngaytra%>: </b> 
<%= borrowedtables.product_id = Date.today%>
</font>
<%end%>
</br>
<font size = '4'>
<a href = "/borrowedtables/paybook"><%= t :quaylai%> </a>
</font>
<%end%>